package com.example.testapplication.ui.splash;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.example.testapplication.ui.guide.GuideActivity;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

public class SplashViewModel extends BaseViewModel {
    public SplashViewModel(@NonNull Application application) {
        super(application);
    }

    //数据的绑定
    public ObservableField<String> text = new ObservableField<>("DOLPHIN");

    //动画结束的事件
    public BindingCommand animationEndCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            startActivity(GuideActivity.class);
            finish();
        }
    });
}
